package com.kepennar.application.domain;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the role database table.
 * 
 */
@Entity
@Table(name="role")
public class Role implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idRole;
	private String nameLocal;
	private Set<Account> accounts;

    public Role() {
    }


	@Id
	@Column(name="id_role", unique=true, nullable=false)
	public int getIdRole() {
		return this.idRole;
	}

	public void setIdRole(int idRole) {
		this.idRole = idRole;
	}


	@Column(name="name_local", nullable=false, length=255)
	public String getNameLocal() {
		return this.nameLocal;
	}

	public void setNameLocal(String nameLocal) {
		this.nameLocal = nameLocal;
	}


	//bi-directional many-to-many association to Account
	@ManyToMany(mappedBy="roles")
	public Set<Account> getAccounts() {
		return this.accounts;
	}

	public void setAccounts(Set<Account> accounts) {
		this.accounts = accounts;
	}
	
}